﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"  schema="dbo"
                   assembly="OpenSda.Agilcont.Common.Data.Entities"
                   namespace="OpenSda.Agilcont.Common.Data.Entities"
                   default-lazy="false" default-cascade="none">
  <class name="CorrelativoDocumento" table="common_Correlativo_Documento">
    <id name="Identity" column="CorrelativoDocumentoId"  type="guid">
      <generator class="guid.comb"/>
    </id>

    <property name="Numero" column="Numero" type="Int"  not-null="false"/>
    <property name="Serie" column="Serie" type="String" length="10"  not-null="false"/>
    
    <property name="DocumentoTipo" column="DocumentoTipo" type="OpenSda.Agilcont.Common.Data.Entities.DocumentoTipo, OpenSda.Agilcont.Common.Data.Entities" not-null="true"/>
    
    <many-to-one name="AgenciaRef" column="AgenciaId" class="OpenSda.Agilcont.Common.Data.Entities.Agencia, OpenSda.Agilcont.Common.Data.Entities" not-null="true" />

  </class>
</hibernate-mapping>
